<?php
namespace app\common\model;

use think\Model;

/**  YSF
 *   入住商模型
 *   Date: 2019/1/3
 * Class CompanyModel
 * @package app\common\model
 */
class CompanyModel extends Model
{
    // 表名
    protected $name = 'company';

    // 单表单条查询
    public function getOne($where=[],$field='*')
    {
        $result = $this->where($where)
                ->field($field)
                ->find();
        return $result;
    }

    // 单个字段操作
    public function setInc($where=[],$field='',$num=0)
    {
        $result = $this->where($where)->setInc($field, $num);
        return $result;
    }






}